<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //获取
    window.alert("Hello BOM");
    alert("Hello BOM Window");

    //方法
    //confirm - 对话框 (boolean类型)
    var falg = confirm("你确认删除该记录吗？");
    alert(falg);

    //定时器 - setInterval -- 周期性的执行某一个函数
    var i = 0;
    setInterval(function(){
        i++;
        console.log("定时器执行了"+i+"次");
    },2000);

    //定时器 - setTimeout -- 延迟指定时间执行一次
    setTimeout(function(){
        alert("JS");
    },5000);//5秒

    //location
    location.href = "https://blog.csdn.net/2303_76505072?spm=1000.2115.3001.5343";
    
</script>
</html>